package com.hinnotek.amoeba.ext

import android.app.Activity
import android.content.Intent
import com.hinnotek.amoeba.bean.old.*


inline fun <reified T : Activity> Activity.startActivity() {
    startActivity(Intent(this, T::class.java))
}

/* val stringList = mutableListOf<String>()*/

fun productManagementArray(data: MutableList<ProductManagamentBean>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].productTypeName
        }
    }
}

fun amibaProjectArray(data: MutableList<AmibaProjectListBean>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].projectName
        }
    }
}


fun projectByCustomerArray(data: MutableList<ProjectByCustomerBean>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].projectName
        }
    }
}


fun ameobaCustomerArray(data: MutableList<AmeobaCustomerListBean>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].customerName
        }
    }
}

fun productArray(data: MutableList<ProductListBean>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].productName
        }
    }
}

fun contractTypeAllArray(data: MutableList<ContractTypeAll>): Array<String?> {
    return arrayOfNulls<String>(data.size).apply {
        for (index in data.indices) {
            this[index] = data[index].contractTypeName
        }
    }
}






















